package api

import (
	"Walker/app/http/model"
	"Walker/app/utils/response"
	"github.com/gin-gonic/gin"
)

type Home struct {
	UserModel model.User
}

// 	@Tags 示例模块
// 	@Summary 示例列表
// 	@Description 列表数据
// 	@Accept  json
// 	@Produce  json
// 	@param Authorization header string false "验证参数Bearer和token空格拼接"
// 	@Success 200 {object} response.JsonResult
// 	@Failure 400 {object} response.JsonResult
// 	@Router / [get]
func (H *Home) Index(ctx *gin.Context) {
	data := []string{"查询成功"}
	response.Success(ctx, "查询成功", data)
}

// 	@Tags 示例模块
// 	@Summary 示例详情
// 	@Description 详情数据
// 	@Accept  json
// 	@Produce  json
// 	@param Authorization header string false "验证参数Bearer和token空格拼接"
// 	@Param id path integer true "主键id"
// 	@Success 200 {object} response.JsonResult
// 	@Failure 400 {object} response.JsonResult
// 	@Router /{id} [get]
func (H *Home) Show(ctx *gin.Context) {
	str := "查询主键：" + ctx.Param("id")
	response.Success(ctx, "查询成功", str)
}

func (H *Home) Update(ctx *gin.Context) {
	str := "修改主键：" + ctx.Param("id")
	response.Success(ctx, "查询成功", str)
}

func (H *Home) Store(ctx *gin.Context) {
	str := "添加数据成功"
	response.Success(ctx, "查询成功", str)
}

// 	@Tags 示例模块
// 	@Summary 示例删除
// 	@Description 示例删除
// 	@Accept  json
// 	@Produce  json
// 	@param Authorization header string false "验证参数Bearer和token空格拼接"
// 	@Param id path integer true "主键id"
// 	@Success 200 {object} response.JsonResult
// 	@Failure 400 {object} response.JsonResult
// 	@Router /{id} [delete]
func (H *Home) Delete(ctx *gin.Context) {
	str := "删除主键：" + ctx.Param("id")
	response.Success(ctx, "查询成功", str)
}
